﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows;

namespace SharpMap.Wpf.Rendering
{
    abstract public class GeoVisual : DrawingVisual 
    {
 
      

        /// <summary>
        /// Replaces the transform, and re-render content
        /// </summary>
        /// <remarks>It is preferable (in terms of performance) to edit the exsisting transform, 
        /// rather then switching it.
        /// </remarks>
        /// <param name="trans">the new transform </param>
        public void SetTransform(Transform trans)
        {
            Transform old = VisualTransform;
            VisualTransform = trans;
            OnTransformChanged(old);
        }
        protected virtual void OnTransformChanged(Transform oldTransform){}
        public virtual void SetStyle(SharpMap.Styles.IStyle style, SharpMap.Rendering.RenderState state) { }
        public abstract void Render(WpfStyleHolder style);
        public abstract Rect Bounds { get; }

    }
}
